package com.zwb.demo.easyweb.modules.database.entity;

import com.zwb.demo.easyweb.common.entity.response.ResultCode;

public enum DatabaseCode implements ResultCode {

    NO_EXIT_DATABASE_TYPE(false, 40000, "不存在的数据库类型"),
    ;

    /**
     * 是否成功
     */
    boolean success;

    /**
     * 操作代码
     */
    int code;

    /**
     * 提示信息
     */
    String message;

    DatabaseCode(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return false;
    }

    @Override
    public int code() {
        return 0;
    }

    @Override
    public String message() {
        return null;
    }
}
